<%@page import="cn.news.entity.Topic"%>
<%@page import="java.util.List"%>
<%@page import="cn.news.biz.TopicBiz"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>显现所有主题</title>
</head>

<body background="pic/ManBgroud.gif">
	<table width="100%" >
		<tr>
			<th>主贴id</th>
			<th>主贴名称</th>
			<th>编辑主贴</th>		
		</tr>
		<% 
		
		 	TopicBiz tBiz=new TopicBiz();
			List<Topic>list=tBiz.searchAll();
		  request.setAttribute("tlist", list);
		
		%>
		<c:forEach items="${tlist}" var="t">
			<tr>
				<th><c:out value="${t.tid}"></c:out> </th>
				<th><c:out value="${t.tname}"></c:out> </th>
				<th><a href="AdminGetBoardInfoServlet?bid=${t.tid}">编辑</a>||<a href="AdminTopicDeleteServlet?bid=${t.tid}">删除</a> </th>
			</tr>
		
		</c:forEach>
		
	</table>
	<%--javascript:confirm('确认删除？')?<%tbiz.delete(tid); %>:window.location.href='topicSucc.jsp';是外键所以不能删除 --%>
</body>
</html>